<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="d1">
<input type="button" value="帅哥" onclick="f(1)">
<input type="button" value="美女" onclick="f(2)">
<hr>
<script>
    let input = document.querySelector("input");
    function f(x) {
        let src = x==1?"a780da93affa09cd5a2aade7a4b7fe6.jpg":"07010c7fda687ea5740cb6ebfd49481.jpg";
        for (let i = 0; i <input.value ; i++) {
            let i = document.createElement("img");
            i.src;
            document.body.append(i);
        }
    }



</script>
</body>
</html>